package com.rp.system.user.mapper;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.rp.system.user.entity.SysUser;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;

/**
 * <p>
 * 用户表 mapper 接口
 * </p>
 *
 * @author vicente
 * @since 2020-11-23
 */
@Mapper
@Component
public interface SysUserMapper extends BaseMapper<SysUser> {

    public SysUser showUser(@Param("username") String username);

    IPage<SysUser> selectMyPage(IPage<SysUser> page, @Param(Constants.WRAPPER) Wrapper wrapper);

    String selectClientSecret(@Param("clientId") String clientId);

    Boolean updateClientSecret(@Param("username") String username,@Param("clientSecret") String clientSecret);
}
